package com.liu.test.service.serviceImpl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liu.test.entity.Statistics;
import com.liu.test.mapper.StatisticMapper;
import com.liu.test.service.StatisticService;
import org.springframework.stereotype.Service;


import java.util.List;


@Service
public class StatisticServiceImpl extends ServiceImpl<StatisticMapper, Statistics> implements StatisticService {
    @Override
    public List<Statistics> get() {
        QueryWrapper<Statistics> wrapper = new QueryWrapper<>();
        List<Statistics> statisticlist = this.list(wrapper);
        return statisticlist;
    }

    @Override
    public int insertInfo(Statistics statistics) {
        QueryWrapper<Statistics> queryWrapper = new QueryWrapper<>();
        boolean flag = this.save(statistics);
        return flag ? 1 : 0;
    }


}
